<!-- if $_rs.is_multiple -->
<select name="{$_rs.identifier}[]" id="{$_rs.identifier}" multiple="true" style="{$_rs.style};width:300px;">
	<!-- foreach($_rslist AS $key=>$value) -->
	<option value="{$value.val}"{if in_array($value["val"],$_rs["content"])} selected{/if}>{$value.title}</option>	
	<!-- /foreach -->
</select>
<!-- else -->
	<!-- if $_is_step -->
	<div id="{$_rs.identifier}_html"></div>
	<script type="text/javascript">
	function opt_{$_rs.identifier}_onchange(val)
	{
		var url = api_url("opt","index",'identifier={$_rs.identifier}&group_id={$_group_id}');
		if(val) url += '&val='+$.str.encode(val);
		var html = $.phpok.ajax(url);
		$("#{$_rs.identifier}_html").html(html);
	}
	$(document).ready(function(){
		opt_{$_rs.identifier}_onchange("{$_rs.content}");
	});
	</script>
	<!-- else -->
	<select id="{$_rs.identifier}" name="{$_rs.identifier}">
		<!-- if $_rs.empty_val -->
		<option value="">{$_rs.empty_val}</option>
		<!-- /if -->
		<!-- php:$_rs.content = is_array($_rs.content) ? $_rs.content.id : $_rs.content -->
		<!-- foreach($_rslist AS $key=>$value) -->
		<option value="{$value.val}"{if $value.val == $_rs.content} selected{/if}>{$value.title}</option>
		<!-- /foreach -->
	</select>
	<!-- /if -->
<!-- /if -->
